package com.xuecheng.api.media;

import com.xuecheng.api.media.model.dto.MediaDTO;
import com.xuecheng.api.media.model.po.QueryMediaModel;
import com.xuecheng.api.media.model.vo.MediaVO;
import com.xuecheng.common.domain.page.PageRequestParams;
import com.xuecheng.common.domain.page.PageVO;
import com.xuecheng.common.domain.response.RestResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;

/**
 * <p></p>
 *
 * @Description:
 */
@Api(value = "媒资管理", tags = "媒资管理API",description = "对媒资信息进行管理")
public interface MediaApi {

    @ApiOperation("根据Id查询媒资信息")
    @ApiImplicitParam(name = "mediaId",
            value = "媒资ID", required = true,
            dataType = "long", paramType = "path", example = "1")
    RestResponse getMediaById(Long mediaId);


    /**
     * 根据课程计划id删除课程计划信息
     * @param mediaId 课程信息id
     */
    @ApiOperation(value = "删除课程计划")
    @ApiImplicitParam(name = "teachPlanId" ,
            value = "媒资Id值",required = true,
            dataType = "Long", paramType = "path", example = "1")
    boolean removeMedia(Long mediaId);

    @ApiOperation("获得媒资信息预览资源地址")
    @ApiImplicitParam(name="mediaId",value = "媒资id值",required = true,dataType = "Long",paramType = "path")
    String previewMedia(Long mediaId);


    @ApiOperation("保存媒资信息")
    @ApiImplicitParam(name = "vo", value = "媒资保存信息", required = true, dataType = "MediaVO", paramType = "body")
    MediaDTO createMedia(MediaVO vo);


    @ApiOperation("媒资信息条件分页查询")
    @ApiImplicitParams({
            @ApiImplicitParam(value = "model",dataType = "QueryMediaModel",paramType = "body")
    })
    PageVO queryMediaList(PageRequestParams params, QueryMediaModel model);

}